<?php defined('_JEXEC') or die('Restricted access');

function simplifySize($bytes) {
    $size = $bytes / 1024; 
    if($size < 1024) { 
        $size = number_format($size, 2); 
        $size .= ' kB'; 
    } else { 
        if($size / 1024 < 1024) { 
            $size = number_format($size / 1024, 2); 
            $size .= ' MB'; 
        } else if ($size / 1024 / 1024 < 1024) { 
            $size = number_format($size / 1024 / 1024, 2); 
            $size .= ' GB'; 
        }  
    } 
    return $size;
}

?>
